using System;
namespace MicroMsg.UI.Util
{
	public class UITask
	{
		private object mTask;
		private object mTaskPara;
		public uint mDuaration;
		public UITask(UITaskDlg taskdlg, uint tDuaration = 0u)
		{
			this.mTask = taskdlg;
			this.mDuaration = tDuaration;
		}
		public UITask(UITaskDlgEx taskdlg, object para, uint tDuaration = 0u)
		{
			this.mTask = taskdlg;
			this.mTaskPara = para;
			this.mDuaration = tDuaration;
		}
		public void DoTask()
		{
			if (this.mTask == null)
			{
				return;
			}
			if (this.mTask is UITaskDlg)
			{
				(this.mTask as UITaskDlg)();
			}
			if (this.mTask is UITaskDlgEx)
			{
				(this.mTask as UITaskDlgEx)(this.mTaskPara);
			}
		}
	}
}
